package thomas.javase.math;

import org.junit.Test;

import java.math.BigDecimal;
import java.math.MathContext;

/**
 * https://www.cnblogs.com/zhangyinhua/p/11545305.html
 */
public class TestBigDecimal {

    @Test
    public void testBigDecimal1(){
        long used = 6666666L;
        BigDecimal mins = new BigDecimal(used*1.0/1000/60);
        BigDecimal mins2 = mins.setScale(1, BigDecimal.ROUND_HALF_UP);
        System.out.println(mins.toString());
        System.out.println(mins2.toString());
    }

}
